//
//  exception.hpp
//  utilities
//
//  Created by Sam Jaffe on 2/4/15.
//  Copyright (c) 2015 Sam Jaffe. All rights reserved.
//

#pragma once

#include <exception>
#include <string>
#include <sstream>

#include "parameter.hpp"

namespace options {
    class parameter_base;
    
    class arity_mismatch_internal {};
    
    class index_out_of_bounds {};
    
    class missing_options : public std::exception {
    public:
        missing_options(const std::set<parameter_base*>& missing);
        virtual const char* what() const noexcept(true);
    private:
        std::set<parameter_base*> missing;
    };
    
    class not_enough_arguments : public std::exception {
    public:
        not_enough_arguments(int min, int given);
        virtual const char* what() const noexcept(true);
    private:
        int min_args = -1;
        int given;
    };
            
    class invalid_arity : public std::exception {
    public:
        virtual const char* what() const noexcept(true);
    };
            
    class illegal_assign_arity {};
    
    class illegal_option_signature : public std::exception {
    public:
        illegal_option_signature();
        illegal_option_signature(const char* cause);
        virtual const char* what() const noexcept(true);
    private:
        std::string cause;
    };
}